<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="com.wxtf.platform.plugins.user.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
UserBean user = (UserBean)request.getSession().getAttribute("userBean");

String _db = user.getDbType();

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>"/>
		<meta http-equiv="pragma" content="no-cache"/>
		<meta http-equiv="cache-control" content="no-cache"/>
		<meta http-equiv="expires" content="0"/>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/Aqua/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/<%=user.getUserCss()%>/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/ligerui-icons.css" />
		<link type="text/css" rel="stylesheet" href="resource/css/style.css" />
		<style type="text/css">
		html{
			background-color:#EAEEF5;
			height:auto;
			width:1700px;
			overflow: scroll;
		}
		
		body{
			height:auto;
			width:1700px;
			overflow: hidden;
		}
		
		#hack_for_ie6{
			display:none;
			_display:block;
			_height:50px;
		}
		#baobiao_table{
			border:1px #222222 solid;
			border-collapse:collapse;
			width:1658px;
		}
		.fixd_head{
			position:fixed;
			left:0px;
			top:29px;
			width:1658px;
			background-color:#EAEEF5;
		}
		.placeholder_head{
			*display:none;
		}
		#search{
			position:fixed;
			*position:static;
			width:100%;
			left:0px;
			top:0px;
			background-color:#EAEEF5;
		}
		#baobiao_table td{
			margin:0px;
			padding:0px;
			border:1px #222222 solid;
			font-size:14px;
			text-align:center;
		}
		#baobiao_table thead td{
			color:#3893CC;
			font-weight: bold;
			text-align:center;
		}
		#baobiao_table tbody td{
			height:27px;
			text-align:right;
		}
		#baobiao_table tfoot td{
			text-align:left;
			padding-left:5px;
			text-align:left;
		}
		.col_num_tr td{
			height:40px;
		}
		#baobiao_table #date_td{
			text-align:right;
		}
		#baobiao_table #title_td{
			font-size:18px;
			font-weight:700;
		}
		#baobiao_table .orgname_td{
			text-align:left;
			!font-size:12px;
		}
		#baobiao_table .children_tr td{
			text-align:right;
			font-size:13px;
		}
		#baobiao_table #date_month,#date_day{
			width:30px;
			text-align:right;
		}
		.table_input{
			padding:0px;
			margin:0px;
			width:92%;
			font-size:13px;
			background:none;
			border:1px #EAEEF5 solid;
			text-align:right;
		}
		.otr_input{
			font-size:13px;
			font-weight:100;
		}
		
		#baobiao_form tbody td a{
			text-decoration:none;
			color:#000000;
		}
		
		#baobiao_form tbody td a:hover{
			text-decoration:none;
			color:#4fa8e6;
		}
	    </style>
	
		<script type="text/javascript" src="js/jquery/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="ligerUI/js/core/base.js"></script>
		<script type="text/javascript" src="ligerUI/js/ligerui.min.js"></script>
		<script type="text/javascript" src="js/common.js"></script>
		<script type="text/javascript" src="js/validata.js"></script>

		<script type="text/javascript" src="ligerUI/js/plugins/ligerGrid.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerTree.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerForm.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerDateEditor.js"></script>
		
		<script type="text/javascript">
			var _db = '<%=_db%>';
			
			var _year = "<%=request.getParameter("year")%>";
			var _type = "<%=request.getParameter("type")%>";
			var _quarter = "<%=request.getParameter("quarter")%>";
			var _curOrgId = "<%=user.getCurOrgId()%>";
			
			_jsonObj.classname = "com.wxtf.platform.main.tjbb.Baobiao1Action";
			_jsonObj.methodname = "querySearch";
			_jsonObj.logicdata = "[{\"type\":\"" + _type + "\",\"org_id\":\"" + _curOrgId + "\",\"year\":\"" + _year + "\",\"quarter\":\"" + _quarter + "\"}]";
			
			var validation_pattern = {
				"e_heji" : {required:true,digits:true,maxlength:6},
				"e_nan" : {required:true,digits:true,maxlength:6},
				"e_nv" : {required:true,digits:true,maxlength:6},
				"e_yihun_nan" : {required:true,digits:true,maxlength:6},
				"e_yihun_nv" : {required:true,digits:true,maxlength:6},
				"e_weihun_nan" : {required:true,digits:true,maxlength:6},
				"e_weihun_nv" : {required:true,digits:true,maxlength:6},
				"e_yhyl_heji" : {required:true,digits:true,maxlength:6},
				"e_yhyl_nan" : {required:true,digits:true,maxlength:6},
				"e_yhyl_nv" : {required:true,digits:true,maxlength:6},
				"e_yhyl_wsy_heji" : {required:true,digits:true,maxlength:6},
				"e_yhyl_wsy_nan" : {required:true,digits:true,maxlength:6},
				"e_yhyl_wsy_nv" : {required:true,digits:true,maxlength:6},
				"e_yhyl_ysy_heji" : {required:true,digits:true,maxlength:6},
				"e_yhyl_ysy_nan" : {required:true,digits:true,maxlength:6},
				"e_yhyl_ysy_nv" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_heji" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_yls_heji" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_yls_jz" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_yls_sh" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_yls_pm" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_yls_gj" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_yls_ym" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_yls_fy" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_yls_qt" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_wls" : {required:true,digits:true,maxlength:6},
				"e_ylsjycs_lsl" : {required:true,number:true,range:[0,100]},
				"reserve1" : {required:true,digits:true,maxlength:6},
				"e_hyrs" : {required:true,digits:true,maxlength:6},
				"reserve2" : {required:true,digits:true,maxlength:6},
				"e_dyrs" : {required:true,digits:true,maxlength:6},
				"e_bjcs" : {required:true,digits:true,maxlength:6}
			};
			
			var _dataTotal = 0;
			$(document).ready(function(){
				$("#title_td").text('第一汽车集团公司人口与计划生育' + _year + '年' + ((_type == 1) ? '第' + _quarter + '季度' : '') + '统计表（一）');
				$("#date_year").text(_year);
				callserver(_jsonObj, function(data, textStatus){
					if(data.Total > 0){
						_dataTotal = data.Total;
						$("#tbr_name").val(data.tbr_name);
						$("#tbr_tel").val(data.tbr_tel);
						$("#date_month").val(data.date_month);
						$("#date_day").val(data.date_day);
						
						var row;
						if(data.Sum){
							row = data.Sum;
							
							var tr = '<tr id="sum_tr"><td>&nbsp;</td>';
							tr = tr + '<td class="orgname_td" style="text-align:center;">合计</td>';
							tr = tr + '<td><input type="text" id="sum_e_heji" name="e_heji" parent="none" class="table_input" value="' + row.e_heji + '" /></td>'
								+ '<td><input type="text" id="sum_e_nan" name="e_nan" parent="none" class="table_input" value="' + row.e_nan + '" /></td>'
								+ '<td><input type="text" id="sum_e_nv" name="e_nv" parent="none" class="table_input" value="' + row.e_nv + '" /></td>'
								+ '<td><input type="text" id="sum_e_yihun_nan" name="e_yihun_nan" parent="none" class="table_input" value="' + row.e_yihun_nan + '" /></td>'
								+ '<td><input type="text" id="sum_e_yihun_nv" name="e_yihun_nv" parent="none" class="table_input" value="' + row.e_yihun_nv + '" /></td>'
								+ '<td><input type="text" id="sum_e_weihun_nan" name="e_weihun_nan" parent="none" class="table_input" value="' + row.e_weihun_nan + '" /></td>'
								+ '<td><input type="text" id="sum_e_weihun_nv" name="e_weihun_nv" parent="none" class="table_input" value="' + row.e_weihun_nv + '" /></td>'
								+ '<td><input type="text" id="sum_e_yhyl_heji" name="e_yhyl_heji" parent="none" class="table_input" value="' + row.e_yhyl_heji + '" /></td>'
								+ '<td><input type="text" id="sum_e_yhyl_nan" name="e_yhyl_nan" parent="none" class="table_input" value="' + row.e_yhyl_nan + '" /></td>'
								+ '<td><input type="text" id="sum_e_yhyl_nv" name="e_yhyl_nv" parent="none" class="table_input" value="' + row.e_yhyl_nv + '" /></td>'
								+ '<td><input type="text" id="sum_e_yhyl_wsy_heji" name="e_yhyl_wsy_heji" parent="none" class="table_input" value="' + row.e_yhyl_wsy_heji + '" /></td>'
								+ '<td><input type="text" id="sum_e_yhyl_wsy_nan" name="e_yhyl_wsy_nan" parent="none" class="table_input" value="' + row.e_yhyl_wsy_nan + '" /></td>'
								+ '<td><input type="text" id="sum_e_yhyl_wsy_nv" name="e_yhyl_wsy_nv" parent="none" class="table_input" value="' + row.e_yhyl_wsy_nv + '" /></td>'
								+ '<td><input type="text" id="sum_e_yhyl_ysy_heji" name="e_yhyl_ysy_heji" parent="none" class="table_input" value="' + row.e_yhyl_ysy_heji + '" /></td>'
								+ '<td><input type="text" id="sum_e_yhyl_ysy_nan" name="e_yhyl_ysy_nan" parent="none" class="table_input" value="' + row.e_yhyl_ysy_nan + '" /></td>'
								+ '<td><input type="text" id="sum_e_yhyl_ysy_nv" name="e_yhyl_ysy_nv" parent="none" class="table_input" value="' + row.e_yhyl_ysy_nv + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_heji" name="e_ylsjycs_heji" parent="none" class="table_input" value="' + row.e_ylsjycs_heji + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_yls_heji" name="e_ylsjycs_yls_heji" parent="none" class="table_input" value="' + row.e_ylsjycs_yls_heji + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_yls_jz" name="e_ylsjycs_yls_jz" parent="none" class="table_input" value="' + row.e_ylsjycs_yls_jz + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_yls_sh" name="e_ylsjycs_yls_sh" parent="none" class="table_input" value="' + row.e_ylsjycs_yls_sh + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_yls_pm" name="e_ylsjycs_yls_pm" parent="none" class="table_input" value="' + row.e_ylsjycs_yls_pm + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_yls_gj" name="e_ylsjycs_yls_gj" parent="none" class="table_input" value="' + row.e_ylsjycs_yls_gj + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_yls_ym" name="e_ylsjycs_yls_ym" parent="none" class="table_input" value="' + row.e_ylsjycs_yls_ym + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_yls_fy" name="e_ylsjycs_yls_fy" parent="none" class="table_input" value="' + row.e_ylsjycs_yls_fy + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_yls_qt" name="e_ylsjycs_yls_qt" parent="none" class="table_input" value="' + row.e_ylsjycs_yls_qt + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_wls" name="e_ylsjycs_wls" parent="none" class="table_input" value="' + row.e_ylsjycs_wls + '" /></td>'
								+ '<td><input type="text" id="sum_e_ylsjycs_lsl" name="e_ylsjycs_lsl" parent="none" class="table_input" value="' + row.e_ylsjycs_lsl + '" /></td>'
								+ '<td><input type="text" id="sum_reserve1" name="reserve1" parent="none" class="table_input" value="' + row.reserve1 + '" /></td>'
								+ '<td><input type="text" id="sum_e_hyrs" name="e_hyrs" parent="none" class="table_input" value="' + row.e_hyrs + '" /></td>'
								+ '<td><input type="text" id="sum_reserve2" name="reserve2" parent="none" class="table_input" value="' + row.reserve2 + '" /></td>'
								+ '<td><input type="text" id="sum_e_dyrs" name="e_dyrs" parent="none" class="table_input" value="' + row.e_dyrs + '" /></td>'
								+ '<td><input type="text" id="sum_e_bjcs" name="e_bjcs" parent="none" class="table_input" value="' + row.e_bjcs + '" /></td>'
							+ '</tr>';
							$("#baobiao_table tbody").append(tr);
						}
						
						for(var i = 0 ; i < data.Total ; i++){
							row = data.Rows[i];
							var tr = '<tr id="' + row.org_id + '_tr"><td>' + (i + 1) + '</td>';
							if(row.Children == 0){
								tr = tr + '<td class="orgname_td">' + row.org_name + '</td>';
							}else{
								tr = tr + '<td class="orgname_td"><a href=javascript:loadSubOrg("' + row.org_id + '") class="children_btn" id="' + row.org_id + '_children_btn">' + row.org_name + '</a></td>';
							}
							tr = tr + '<td><input type="text" id="' + row.org_id + '_e_heji" name="e_heji" parent="sum" class="table_input" value="' + row.e_heji + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_nan" name="e_nan" parent="sum" class="table_input" value="' + row.e_nan + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_nv" name="e_nv" parent="sum" class="table_input" value="' + row.e_nv + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yihun_nan" name="e_yihun_nan" parent="sum" class="table_input" value="' + row.e_yihun_nan + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yihun_nv" name="e_yihun_nv" parent="sum" class="table_input" value="' + row.e_yihun_nv + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_weihun_nan" name="e_weihun_nan" parent="sum" class="table_input" value="' + row.e_weihun_nan + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_weihun_nv" name="e_weihun_nv" parent="sum" class="table_input" value="' + row.e_weihun_nv + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yhyl_heji" name="e_yhyl_heji" parent="sum" class="table_input" value="' + row.e_yhyl_heji + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yhyl_nan" name="e_yhyl_nan" parent="sum" class="table_input" value="' + row.e_yhyl_nan + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yhyl_nv" name="e_yhyl_nv" parent="sum" class="table_input" value="' + row.e_yhyl_nv + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yhyl_wsy_heji" name="e_yhyl_wsy_heji" parent="sum" class="table_input" value="' + row.e_yhyl_wsy_heji + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yhyl_wsy_nan" name="e_yhyl_wsy_nan" parent="sum" class="table_input" value="' + row.e_yhyl_wsy_nan + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yhyl_wsy_nv" name="e_yhyl_wsy_nv" parent="sum" class="table_input" value="' + row.e_yhyl_wsy_nv + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yhyl_ysy_heji" name="e_yhyl_ysy_heji" parent="sum" class="table_input" value="' + row.e_yhyl_ysy_heji + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yhyl_ysy_nan" name="e_yhyl_ysy_nan" parent="sum" class="table_input" value="' + row.e_yhyl_ysy_nan + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_yhyl_ysy_nv" name="e_yhyl_ysy_nv" parent="sum" class="table_input" value="' + row.e_yhyl_ysy_nv + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_heji" name="e_ylsjycs_heji" parent="sum" class="table_input" value="' + row.e_ylsjycs_heji + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_heji" name="e_ylsjycs_yls_heji" parent="sum" class="table_input" value="' + row.e_ylsjycs_yls_heji + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_jz" name="e_ylsjycs_yls_jz" parent="sum" class="table_input" value="' + row.e_ylsjycs_yls_jz + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_sh" name="e_ylsjycs_yls_sh" parent="sum" class="table_input" value="' + row.e_ylsjycs_yls_sh + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_pm" name="e_ylsjycs_yls_pm" parent="sum" class="table_input" value="' + row.e_ylsjycs_yls_pm + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_gj" name="e_ylsjycs_yls_gj" parent="sum" class="table_input" value="' + row.e_ylsjycs_yls_gj + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_ym" name="e_ylsjycs_yls_ym" parent="sum" class="table_input" value="' + row.e_ylsjycs_yls_ym + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_fy" name="e_ylsjycs_yls_fy" parent="sum" class="table_input" value="' + row.e_ylsjycs_yls_fy + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_qt" name="e_ylsjycs_yls_qt" parent="sum" class="table_input" value="' + row.e_ylsjycs_yls_qt + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_wls" name="e_ylsjycs_wls" parent="sum" class="table_input" value="' + row.e_ylsjycs_wls + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_ylsjycs_lsl" name="e_ylsjycs_lsl" parent="sum" class="table_input" value="' + row.e_ylsjycs_lsl + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_reserve1" name="reserve1" parent="sum" class="table_input" value="' + row.reserve1 + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_hyrs" name="e_hyrs" parent="sum" class="table_input" value="' + row.e_hyrs + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_reserve2" name="reserve2" parent="sum" class="table_input" value="' + row.reserve2 + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_dyrs" name="e_dyrs" parent="sum" class="table_input" value="' + row.e_dyrs + '" /></td>'
								+ '<td><input type="text" id="' + row.org_id + '_e_bjcs" name="e_bjcs" parent="sum" class="table_input" value="' + row.e_bjcs + '" /></td>'
							+ '</tr>';
							$("#baobiao_table tbody").append(tr);
							
						}
						addInputCalLogic();
					}else{
						$("#baobiao_table tbody").append('<tr><td colspan="32">' + _year + '年' + ((_type == 1) ? '第' + _quarter + '季度' : '') + '没有上报数据！</td></tr>');
					}
				}, ajaxCallbackErrorFunc);
				
            });
            
            /*
			 * 表格刷新
			 */
			function reload(){
				window.location.reload();
			}
			
			/*
			 * ajax成功回调
			 */
			function ajaxCallbackSuccFunc(data, textStatus){
				succMsgTip(data.resultrecord);
			}
			
			/*
			 * ajax失败回调
			 */
			function ajaxCallbackErrorFunc(data, textStatus){
				succMsgTip(data.resultrecord);
			}
			
			function removeInputCalLogic(){
				$(".table_input").unbind();
			}
			
			function loadSubOrg(id){
				// 判断是否已经加载过子部门的数据
				if($(".children_" + id).size() > 0){
					if($(".children_" + id + ":hidden").size() > 0){
						$(".children_" + id).show();
					}else{
						$(".children_" + id).hide();
					}
				}else{
					_jsonObj.methodname = "querySubOrg";
					_jsonObj.logicdata = "[{\"type\":\"" + _type + "\",\"org_id\":\"" + id + "\",\"year\":\"" + _year + "\",\"quarter\":\"" + _quarter + "\"}]";
					callserver(_jsonObj, function(data){
						if(data.Total > 0){
							var row;
							var tr = "";
							for(var i = 0 ; i < data.Total ; i++){
								row = data.Rows[i];
								tr = tr + '<tr id="' + row.org_id + '_tr" class="children_' + id + '">'
									+ '<td class="children_td">' + (i + 1) + '</td>';
								if(row.Children == 0){
									tr = tr + '<td class="children_td orgname_td">' + row.org_name + '</td>';
								}else{
									tr = tr + '<td class="children_td orgname_td"><a href=javascript:loadSubOrg("' + row.org_id + '") class="children_btn" id="' + row.org_id + '_children_btn">' + row.org_name + '</a></td>';
								}
								tr = tr + '<td class="children_td"><input type="text" id="' + row.org_id + '_e_heji" name="e_heji" parent="' + id + '" class="table_input" value="' + row.e_heji + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_nan" name="e_nan" parent="' + id + '" class="table_input" value="' + row.e_nan + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_nv" name="e_nv" parent="' + id + '" class="table_input" value="' + row.e_nv + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yihun_nan" name="e_yihun_nan" parent="' + id + '" class="table_input" value="' + row.e_yihun_nan + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yihun_nv" name="e_yihun_nv" parent="' + id + '" class="table_input" value="' + row.e_yihun_nv + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_weihun_nan" name="e_weihun_nan" parent="' + id + '" class="table_input" value="' + row.e_weihun_nan + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_weihun_nv" name="e_weihun_nv" parent="' + id + '" class="table_input" value="' + row.e_weihun_nv + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yhyl_heji" name="e_yhyl_heji" parent="' + id + '" class="table_input" value="' + row.e_yhyl_heji + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yhyl_nan" name="e_yhyl_nan" parent="' + id + '" class="table_input" value="' + row.e_yhyl_nan + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yhyl_nv" name="e_yhyl_nv" parent="' + id + '" class="table_input" value="' + row.e_yhyl_nv + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yhyl_wsy_heji" name="e_yhyl_wsy_heji" parent="' + id + '" class="table_input" value="' + row.e_yhyl_wsy_heji + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yhyl_wsy_nan" name="e_yhyl_wsy_nan" parent="' + id + '" class="table_input" value="' + row.e_yhyl_wsy_nan + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yhyl_wsy_nv" name="e_yhyl_wsy_nv" parent="' + id + '" class="table_input" value="' + row.e_yhyl_wsy_nv + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yhyl_ysy_heji" name="e_yhyl_ysy_heji" parent="' + id + '" class="table_input" value="' + row.e_yhyl_ysy_heji + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yhyl_ysy_nan" name="e_yhyl_ysy_nan" parent="' + id + '" class="table_input" value="' + row.e_yhyl_ysy_nan + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_yhyl_ysy_nv" name="e_yhyl_ysy_nv" parent="' + id + '" class="table_input" value="' + row.e_yhyl_ysy_nv + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_heji" name="e_ylsjycs_heji" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_heji + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_heji" name="e_ylsjycs_yls_heji" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_yls_heji + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_jz" name="e_ylsjycs_yls_jz" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_yls_jz + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_sh" name="e_ylsjycs_yls_sh" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_yls_sh + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_pm" name="e_ylsjycs_yls_pm" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_yls_pm + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_gj" name="e_ylsjycs_yls_gj" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_yls_gj + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_ym" name="e_ylsjycs_yls_ym" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_yls_ym + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_fy" name="e_ylsjycs_yls_fy" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_yls_fy + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_yls_qt" name="e_ylsjycs_yls_qt" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_yls_qt + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_wls" name="e_ylsjycs_wls" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_wls + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_ylsjycs_lsl" name="e_ylsjycs_lsl" parent="' + id + '" class="table_input" value="' + row.e_ylsjycs_lsl + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_reserve1" name="reserve1" parent="' + id + '" class="table_input" value="' + row.reserve1 + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_hyrs" name="e_hyrs" parent="' + id + '" class="table_input" value="' + row.e_hyrs + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_reserve2" name="reserve2" parent="' + id + '" class="table_input" value="' + row.reserve2 + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_dyrs" name="e_dyrs" parent="' + id + '" class="table_input" value="' + row.e_dyrs + '" /></td>'
									+ '<td class="children_td"><input type="text" id="' + row.org_id + '_e_bjcs" name="e_bjcs" parent="' + id + '" class="table_input" value="' + row.e_bjcs + '" /></td>'
								+ '</tr>';
							}
							$("#" + id + "_tr").after(tr);
							addInputCalLogic();
						}
					}, ajaxCallbackErrorFunc);
				}
			}
			
			/**
			 * 提交前的输入项验证
			 * @memberOf 
			 * @return boolean
			 * 正确：true 不正确：false 
			 */
			function doValidate(){
				var vp,input_value;
				var result = true;
				$(".table_input").each(function(){
					vp = validation_pattern[$(this).attr("name")];
					input_value = $(this).val();
					if(vp.required && ($.trim(input_value) == "")){
						$(this).css("border-color","red").css("border-size","1px");
						warningTip("数据不能为空！");
						result = false;
						return false;
					}
					if(vp.digits && (!checkIsNum(input_value))){
						$(this).css("border-color","red").css("border-size","1px");
						warningTip("您输入的“" + input_value + "”为非法字符，请输入正整数！");
						result = false;
						return false;
					}
					if(vp.maxlength && (fucCheckLength(input_value) > vp.maxlength)){
						$(this).css("border-color","red").css("border-size","1px");
						warningTip("您输入的“" + input_value + "”长度超过" + vp.maxlength + "位，请重新输入！");
						result = false;
						return false;
					}
					if(vp.number && isNaN(input_value)){
						$(this).css("border-color","red").css("border-size","1px");
						warningTip("您输入的“" + input_value + "”为非法字符，请输入数字！");
						result = false;
						return false;
					}
					if(vp.number && vp.range && (vp.range[0] > input_value || input_value > vp.range[1])){
						$(this).css("border-color","red").css("border-size","1px");
						warningTip("您输入的“" + input_value + "”超过范围，请输入" + vp.range[0] + "到" + vp.range[1] + "之间的数字！");
						result = false;
						return false;
					}
				});
				return result;
			}
			
			function calSum(parent_id , column_name){
				var sum = 0;
				$(".table_input[parent='" + parent_id + "'][name='" + column_name + "']").each(function(){
					sum = sum + (isNaN($(this).val()) || ($(this).val() == '') ? 0 : parseInt($(this).val()));
				});
				$("#" + parent_id + "_" + column_name).val(sum);
			}
			
			function addInputCalLogic(){
				removeInputCalLogic();
				
				$(".table_input").mouseover(function(event){
					$(this).css("border","1px #4fa8e6 solid");
				});
				$(".table_input").mouseout(function(event){
					$(this).css("border","1px #EAEEF5 solid");
				});
				
				$(".table_input").keyup(function(){
					var column_name = $(this).attr("name");
					var parent_id = $(this).attr("parent");
					var id = $(this).attr("id").split("_")[0];
					
					if(column_name == "e_ylsjycs_lsl"){
						return;
					}
					
					if(column_name == 'e_nan'){
						cal3(id);
					}else if(column_name == 'e_nv'){
						cal3(id);
					}else if(column_name == 'e_yihun_nan'){
						cal4(id);
					}else if(column_name == 'e_weihun_nan'){
						cal4(id);
					}else if(column_name == 'e_yihun_nv'){
						cal5(id);
					}else if(column_name == 'e_weihun_nv'){
						cal5(id);
					}else if(column_name == 'e_yhyl_nan'){
						cal10(id);
					}else if(column_name == 'e_yhyl_nv'){
						cal10(id);
						cal18(id);
					}else if(column_name == 'e_yhyl_heji'){
						cal6_2(id);
					}else if(column_name == 'e_yhyl_wsy_heji'){
						cal6_2(id);
					}else if(column_name == 'e_yhyl_wsy_nan'){
						cal13(id);
					}else if(column_name == 'e_yhyl_wsy_nv'){
						cal13(id);
						cal18(id);
					}else if(column_name == 'e_yhyl_ysy_nan'){
						cal16(id);
					}else if(column_name == 'e_yhyl_ysy_nv'){
						cal16(id);
					}else if(column_name == 'e_ylsjycs_heji'){
						cal29(id);
					}else if(column_name == 'e_ylsjycs_yls_heji'){
						cal19(id);
					}else if(column_name == 'e_ylsjycs_wls'){
						cal19(id);
					}else if(column_name == 'e_ylsjycs_yls_jz'){
						cal20(id);
					}else if(column_name == 'e_ylsjycs_yls_sh'){
						cal20(id);
					}else if(column_name == 'e_ylsjycs_yls_pm'){
						cal20(id);
					}else if(column_name == 'e_ylsjycs_yls_gj'){
						cal20(id);
					}else if(column_name == 'e_ylsjycs_yls_ym'){
						cal20(id);
					}else if(column_name == 'e_ylsjycs_yls_fy'){
						cal20(id);
					}else if(column_name == 'e_ylsjycs_yls_qt'){
						cal20(id);
					}
					
					//如果parent_id为none说明没有父部门了，即为合计行，不计算合计并退出事件链
					if(parent_id == "none"){
						return;
					}
					calSum(parent_id,column_name);
					if(parent_id != "none"){
						$("#" + parent_id + "_" + column_name).trigger("keyup");
					}
				});
				
			}
			
			
			function cal3(id){
            	var e_nan = isNaN(parseInt($("#" + id + "_e_nan").val())) ? 0 : parseInt($("#" + id + "_e_nan").val());
            	var e_nv = isNaN(parseInt($("#" + id + "_e_nv").val())) ? 0 : parseInt($("#" + id + "_e_nv").val());
				$("#" + id + "_e_heji").val(e_nan + e_nv);
			}
			
			function cal4(id){
            	var e_yihun_nan = isNaN(parseInt($("#" + id + "_e_yihun_nan").val())) ? 0 : parseInt($("#" + id + "_e_yihun_nan").val());
            	var e_weihun_nan = isNaN(parseInt($("#" + id + "_e_weihun_nan").val())) ? 0 : parseInt($("#" + id + "_e_weihun_nan").val());
				$("#" + id + "_e_nan").val(e_yihun_nan + e_weihun_nan);
				cal3(id);
			}
			
			function cal5(id){
            	var e_yihun_nv = isNaN(parseInt($("#" + id + "_e_yihun_nv").val())) ? 0 : parseInt($("#" + id + "_e_yihun_nv").val());
            	var e_weihun_nv = isNaN(parseInt($("#" + id + "_e_weihun_nv").val())) ? 0 : parseInt($("#" + id + "_e_weihun_nv").val());
				$("#" + id + "_e_nv").val(e_yihun_nv + e_weihun_nv);
				cal3(id);
			}
			
			function cal10(id){
            	var e_yhyl_nan = isNaN(parseInt($("#" + id + "_e_yhyl_nan").val())) ? 0 : parseInt($("#" + id + "_e_yhyl_nan").val());
            	var e_yhyl_nv = isNaN(parseInt($("#" + id + "_e_yhyl_nv").val())) ? 0 : parseInt($("#" + id + "_e_yhyl_nv").val());
				$("#" + id + "_e_yhyl_heji").val(e_yhyl_nan + e_yhyl_nv);
				cal16_2(id);
			}
			
			function cal13(id){
            	var e_yhyl_wsy_nan = isNaN(parseInt($("#" + id + "_e_yhyl_wsy_nan").val())) ? 0 : parseInt($("#" + id + "_e_yhyl_wsy_nan").val());
            	var e_yhyl_wsy_nv = isNaN(parseInt($("#" + id + "_e_yhyl_wsy_nv").val())) ? 0 : parseInt($("#" + id + "_e_yhyl_wsy_nv").val());
				$("#" + id + "_e_yhyl_wsy_heji").val(e_yhyl_wsy_nan + e_yhyl_wsy_nv);
				cal16_2(id);
			}
			
			function cal16(id){
				var e_yhyl_ysy_nan = isNaN(parseInt($("#" + id + "_e_yhyl_ysy_nan").val())) ? 0 : parseInt($("#" + id + "_e_yhyl_ysy_nan").val());
            	var e_yhyl_ysy_nv = isNaN(parseInt($("#" + id + "_e_yhyl_ysy_nv").val())) ? 0 : parseInt($("#" + id + "_e_yhyl_ysy_nv").val());
				$("#" + id + "_e_yhyl_ysy_heji").val(e_yhyl_ysy_nan + e_yhyl_ysy_nv);
			}
			
			function cal16_2(id){
            	var e_yhyl_wsy_heji = isNaN(parseInt($("#" + id + "_e_yhyl_wsy_heji").val())) ? 0 : parseInt($("#" + id + "_e_yhyl_wsy_heji").val());
            	var e_yhyl_heji = isNaN(parseInt($("#" + id + "_e_yhyl_heji").val())) ? 0 : parseInt($("#" + id + "_e_yhyl_heji").val());
				$("#" + id + "_e_yhyl_ysy_heji").val((e_yhyl_heji - e_yhyl_wsy_heji) < 0 ? 0 : (e_yhyl_heji - e_yhyl_wsy_heji));
			}
			
			function cal18(id){
            	var e_yhyl_nv = isNaN(parseInt($("#" + id + "_e_yhyl_nv").val())) ? 0 : parseInt($("#" + id + "_e_yhyl_nv").val());
            	var e_yhyl_wsy_nv = isNaN(parseInt($("#" + id + "_e_yhyl_wsy_nv").val())) ? 0 : parseInt($("#" + id + "_e_yhyl_wsy_nv").val());
				$("#" + id + "_e_yhyl_ysy_nv").val((e_yhyl_nv - e_yhyl_wsy_nv) < 0 ? 0 : (e_yhyl_nv - e_yhyl_wsy_nv));
				cal16(id);
			}
			
			function cal19(id){
            	var e_ylsjycs_yls_heji = isNaN(parseInt($("#" + id + "_e_ylsjycs_yls_heji").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_yls_heji").val());
            	var e_ylsjycs_wls = isNaN(parseInt($("#" + id + "_e_ylsjycs_wls").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_wls").val());
				$("#" + id + "_e_ylsjycs_heji").val(e_ylsjycs_yls_heji + e_ylsjycs_wls);
				cal28(id);
				cal29(id);
			}
			
			function cal20(id){
            	var e_ylsjycs_yls_jz = isNaN(parseInt($("#" + id + "_e_ylsjycs_yls_jz").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_yls_jz").val());
            	var e_ylsjycs_yls_sh = isNaN(parseInt($("#" + id + "_e_ylsjycs_yls_sh").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_yls_sh").val());
            	var e_ylsjycs_yls_pm = isNaN(parseInt($("#" + id + "_e_ylsjycs_yls_pm").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_yls_pm").val());
            	var e_ylsjycs_yls_gj = isNaN(parseInt($("#" + id + "_e_ylsjycs_yls_gj").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_yls_gj").val());
            	var e_ylsjycs_yls_ym = isNaN(parseInt($("#" + id + "_e_ylsjycs_yls_ym").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_yls_ym").val());
            	var e_ylsjycs_yls_fy = isNaN(parseInt($("#" + id + "_e_ylsjycs_yls_fy").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_yls_fy").val());
            	var e_ylsjycs_yls_qt = isNaN(parseInt($("#" + id + "_e_ylsjycs_yls_qt").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_yls_qt").val());
            	
				$("#" + id + "_e_ylsjycs_yls_heji").val(e_ylsjycs_yls_jz + e_ylsjycs_yls_sh + e_ylsjycs_yls_pm + e_ylsjycs_yls_gj + e_ylsjycs_yls_ym + e_ylsjycs_yls_fy + e_ylsjycs_yls_qt);
				cal29(id);
				cal19(id);
			}
			
			function cal28(id){
            	var e_ylsjycs_heji = isNaN(parseInt($("#" + id + "_e_ylsjycs_heji").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_heji").val());
            	var e_ylsjycs_yls_heji = isNaN(parseInt($("#" + id + "_e_ylsjycs_yls_heji").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_yls_heji").val());
				$("#" + id + "_e_ylsjycs_wls").val((e_ylsjycs_heji - e_ylsjycs_yls_heji) < 0 ? 0 : (e_ylsjycs_heji - e_ylsjycs_yls_heji));
			}
			
			function cal29(id){
            	var e_ylsjycs_yls_heji = isNaN(parseInt($("#" + id + "_e_ylsjycs_yls_heji").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_yls_heji").val());
            	var e_ylsjycs_heji = isNaN(parseInt($("#" + id + "_e_ylsjycs_heji").val())) ? 0 : parseInt($("#" + id + "_e_ylsjycs_heji").val());
				if(e_ylsjycs_heji == 0){
					$("#" + id + "_e_ylsjycs_lsl").val("0");
				}else{
					$("#" + id + "_e_ylsjycs_lsl").val(e_ylsjycs_yls_heji > e_ylsjycs_heji ? "100" : ((e_ylsjycs_yls_heji/e_ylsjycs_heji) * 100).toFixed(2) * 100 / 100);
				}
			}
            
			function getAllJSONData(){
				var idPre = "";
				var data = "[";
				var size = $("#baobiao_table tbody tr:visible").size();
				$("#baobiao_table tbody tr:visible").each(function(index){
					var id = $(this).attr("id").split("_")[0];
					var name = $(this).find(".orgname_td").first().text();
					idPre = id + "_";
					
					var dataRow = "{";
					
					//dataRow = dataRow + '\"org_id\" : \"' + id + '\",';
					dataRow = dataRow + '\"1\" : \"' + name + '\",';
					dataRow = dataRow + '\"2\" : \"' + $("#" + idPre + "e_heji").val() + '\",';
					dataRow = dataRow + '\"3\" : \"' + $("#" + idPre + "e_nan").val() + '\",';
					dataRow = dataRow + '\"4\" : \"' + $("#" + idPre + "e_nv").val() + '\",';
					dataRow = dataRow + '\"5\" : \"' + $("#" + idPre + "e_yihun_nan").val() + '\",';
					dataRow = dataRow + '\"6\" : \"' + $("#" + idPre + "e_yihun_nv").val() + '\",';
					dataRow = dataRow + '\"7\" : \"' + $("#" + idPre + "e_weihun_nan").val() + '\",';
					dataRow = dataRow + '\"8\" : \"' + $("#" + idPre + "e_weihun_nv").val() + '\",';
					dataRow = dataRow + '\"9\" : \"' + $("#" + idPre + "e_yhyl_heji").val() + '\",';
					dataRow = dataRow + '\"10\" : \"' + $("#" + idPre + "e_yhyl_nan").val() + '\",';
					dataRow = dataRow + '\"11\" : \"' + $("#" + idPre + "e_yhyl_nv").val() + '\",';
					dataRow = dataRow + '\"12\" : \"' + $("#" + idPre + "e_yhyl_wsy_heji").val() + '\",';
					dataRow = dataRow + '\"13\" : \"' + $("#" + idPre + "e_yhyl_wsy_nan").val() + '\",';
					dataRow = dataRow + '\"14\" : \"' + $("#" + idPre + "e_yhyl_wsy_nv").val() + '\",';
					dataRow = dataRow + '\"15\" : \"' + $("#" + idPre + "e_yhyl_ysy_heji").val() + '\",';
					dataRow = dataRow + '\"16\" : \"' + $("#" + idPre + "e_yhyl_ysy_nan").val() + '\",';
					dataRow = dataRow + '\"17\" : \"' + $("#" + idPre + "e_yhyl_ysy_nv").val() + '\",';
					dataRow = dataRow + '\"18\" : \"' + $("#" + idPre + "e_ylsjycs_heji").val() + '\",';
					dataRow = dataRow + '\"19\" : \"' + $("#" + idPre + "e_ylsjycs_yls_heji").val() + '\",';
					dataRow = dataRow + '\"20\" : \"' + $("#" + idPre + "e_ylsjycs_yls_jz").val() + '\",';
					dataRow = dataRow + '\"21\" : \"' + $("#" + idPre + "e_ylsjycs_yls_sh").val() + '\",';
					dataRow = dataRow + '\"22\" : \"' + $("#" + idPre + "e_ylsjycs_yls_pm").val() + '\",';
					dataRow = dataRow + '\"23\" : \"' + $("#" + idPre + "e_ylsjycs_yls_gj").val() + '\",';
					dataRow = dataRow + '\"24\" : \"' + $("#" + idPre + "e_ylsjycs_yls_ym").val() + '\",';
					dataRow = dataRow + '\"25\" : \"' + $("#" + idPre + "e_ylsjycs_yls_fy").val() + '\",';
					dataRow = dataRow + '\"26\" : \"' + $("#" + idPre + "e_ylsjycs_yls_qt").val() + '\",';
					dataRow = dataRow + '\"27\" : \"' + $("#" + idPre + "e_ylsjycs_wls").val() + '\",';
					dataRow = dataRow + '\"28\" : \"' + $("#" + idPre + "e_ylsjycs_lsl").val() + '\",';
					dataRow = dataRow + '\"29\" : \"' + $("#" + idPre + "reserve1").val() + '\",';
					dataRow = dataRow + '\"30\" : \"' + $("#" + idPre + "e_hyrs").val() + '\",';
					dataRow = dataRow + '\"31\" : \"' + $("#" + idPre + "reserve2").val() + '\",';
					dataRow = dataRow + '\"32\" : \"' + $("#" + idPre + "e_dyrs").val() + '\",';
					dataRow = dataRow + '\"33\" : \"' + $("#" + idPre + "e_bjcs").val() + '\"';
					
					dataRow = dataRow + "}";
					if(index != size - 1){
						dataRow = dataRow + ",";
					}
					data = data + dataRow;
				});
				
				data = data + "]";
				return "[{\"type\":\"" + _type + "\",\"year\":\"" + _year + "\",\"quarter\":\"" + _quarter + "\",\"date_month\":\"" + $("#date_month").val() + "\",\"date_day\":\"" + $("#date_day").val() + "\",\"tbr_name\":\"" + $("#tbr_name").val() + "\",\"tbr_tel\":\"" + $("#tbr_tel").val() + "\",\"data\":" + data + "}]";
			}
			
			
			function download(){
				if(!doValidate()) return false;
				
				_jsonObj.methodname = "download";
				_jsonObj.logicdata = getAllJSONData();
				
				callserver(_jsonObj, function(data, textStatus){
					
					if(data.result){
						downloadFile(data.resultrecord);
					} else {
						succMsgTip(data.resultrecord);
					}
					
				}, function(data, textStatus){
				});
				
			}
			
		</script>
	</head>
  	<body>
	    <div id="baobiao">
	    	<button onclick="download()" class="btn2">导出报表</button>
			<button onclick="reload()" class="btn2">重置数据</button>
			<button onclick="history.back(-1)" class="btn2">返&nbsp;&nbsp;回</button>
	    	<form id="baobiao_form" name="baobiao_form">
	    	<table id="baobiao_table">
				<thead>
					<tr><td id="title_td" colspan="34" height="40">第一汽车集团公司人口与计划生育统计表（一）</td></tr>
					<tr><td id="date_td" colspan="34" height="30"><span id="date_year">2012</span>年<input type="text" id="date_month" name="date_month" validate="{required:true,digits:true,maxlength:2}" class="otr_input textbg1"/>月<input type="text" id="date_day" name="date_day" size="2" validate="{required:true,digits:true,maxlength:2}" class="otr_input textbg1"/>日</td></tr>
					<tr>
						<td rowspan="3">序<br/><br/>号</td>
						<td rowspan="3">单&nbsp;&nbsp;位</td>
						<td colspan="7" height="50">职&nbsp;工&nbsp;人&nbsp;数</td>
						<td colspan="3">已婚育龄职工数</td>
						<td colspan="3">已婚育龄无<br/>生育条件人数</td>
						<td colspan="3">已婚育龄有<br/>生育条件人数</td>
						<td colspan="11">有生育条件已婚育龄妇女应落实节育措施人数</td>
						<td colspan="2" >怀孕<br/>人数</td>
						<td colspan="2" >等孕<br/>人数</td>
						<td rowspan="3"  id="thead_td_bjcs">本<br/>季<br/>出<br/>生</td>
					</tr>
					<tr>
						<td rowspan="2" height="150">合<br/><br/>计</td>
						<td rowspan="2" >男</td>
						<td rowspan="2" >女</td>
						<td colspan="2" height="50">已婚</td>
						<td colspan="2">未婚</td>
						<td rowspan="2" >小<br/><br/>计</td>
						<td rowspan="2" >男</td>
						<td rowspan="2" >女</td>
						<td rowspan="2" >小<br/><br/>计</td>
						<td rowspan="2" >男</td>
						<td rowspan="2" >女</td>
						<td rowspan="2" >小<br/><br/>计</td>
						<td rowspan="2" >男</td>
						<td rowspan="2" >女</td>
						<td rowspan="2" >合<br/><br/>计</td>
						<td colspan="8">已&nbsp;落&nbsp;实&nbsp;节&nbsp;育&nbsp;措&nbsp;施&nbsp;人&nbsp;数</td>
						<td rowspan="2">未<br/>落<br/>实<br/>节<br/>育<br/>措<br/>施<br/>人</td>
						<td rowspan="2">节<br/>育<br/>措<br/>施<br/>落<br/>实<br/>率<br/>%</td>
						<td rowspan="2">男</td>
						<td rowspan="2">女</td>
						<td rowspan="2">男</td>
						<td rowspan="2">女</td>
					</tr>
					<tr>
						<td height="100" >男</td>
						<td >女</td>
						<td >男</td>
						<td >女</td>
						<td >小<br/>计</td>
						<td >结<br/>扎</td>
						<td >上<br/>环</td>
						<td >皮<br/>埋</td>
						<td >工<br/>具</td>
						<td >药<br/>膜</td>
						<td >服<br/>药</td>
						<td >其<br/>他</td>
					</tr>
					<tr class="col_num_tr"><td style="width:25px">1</td><td style="width:100px">2</td><td style="width:60px">3</td><td style="width:50px">4</td><td style="width:50px">5</td><td style="width:50px">6</td><td style="width:50px">7</td><td style="width:50px">8</td><td style="width:50px">9</td><td style="width:50px">10</td><td style="width:50px">11</td><td style="width:50px">12</td><td style="width:45px">13</td><td style="width:45px">14</td><td style="width:45px">15</td><td style="width:50px">16</td><td style="width:50px">17</td><td style="width:50px">18</td><td style="width:50px">19</td><td style="width:50px">20</td><td style="width:45px">21</td><td style="width:45px">22</td><td style="width:45px">23</td><td style="width:45px">24</td><td style="width:45px">25</td><td style="width:45px">26</td><td style="width:45px">27</td><td style="width:40px">28</td><td style="width:50px">29</td><td style="width:40px">30</td><td style="width:40px">31</td><td style="width:40px">32</td><td style="width:40px">33</td><td style="width:40px">34</td></tr>
				</thead>
				<tbody>
				</tbody>
				<tfoot>
					<tr>
						<td colspan="34" height="30">
							填表人：<input type="text" id="tbr_name" name="tbr_name" size="10" style="margin-right:400px;" class="otr_input textbg1"/>
							联系电话：<input type="text" id="tbr_tel" name="tbr_tel" size="20" class="otr_input textbg1"/>
						</td>
					</tr>
					<tr>
						<td colspan="34" height="40">
							逻辑关系:
							&nbsp;&nbsp;&nbsp;&nbsp;3=4+5;
							&nbsp;&nbsp;&nbsp;&nbsp;4=6+8;
							&nbsp;&nbsp;&nbsp;&nbsp;5=7+9;
							&nbsp;&nbsp;&nbsp;&nbsp;10=11+12;
							&nbsp;&nbsp;&nbsp;&nbsp;13=14+15;
							&nbsp;&nbsp;&nbsp;&nbsp;16=17+18;
							&nbsp;&nbsp;&nbsp;&nbsp;16=10-13;
							&nbsp;&nbsp;&nbsp;&nbsp;18=12-15;
							<br/>
							&nbsp;&nbsp;&nbsp;&nbsp;20=21+22+23+24+25+26+27;
							&nbsp;&nbsp;&nbsp;&nbsp;19=20+28;
							&nbsp;&nbsp;&nbsp;&nbsp;28=19-20;
							&nbsp;&nbsp;&nbsp;&nbsp;29=20/19×100%;
							
						</td>
					</tr>
				</tfoot>
			</table>
			</form>
			<br/>
			<button onclick="download()" class="btn2">导出报表</button>
			<button onclick="reload()" class="btn2">重置数据</button>
			<button onclick="history.back(-1)" class="btn2">返&nbsp;&nbsp;回</button>
			<div id="hack_for_ie6"></div>
	    </div>
	</body>
</html>
